using UnityEngine;

public class HitControl : MonoBehaviour
{
	private ParticleSystem pars;

	private void OnEnable()
	{
		if (pars == null)
		{
			pars = GetComponent<ParticleSystem>();
		}
		if ((bool)pars)
		{
			pars.Play();
		}
	}

	private void OnDisable()
	{
		pars.Clear();
	}

	private void Update()
	{
		if (pars.isStopped)
		{
			base.gameObject.SetActive(value: false);
		}
	}
}
